Part 1 of zero knowledge proofs; computing G(x) #978
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At each step of the process, the prover has two vectors,
u
andv
. These are compressed by some compression factorλ
(e.g. 4) to produce new vectorsu
andv
with lengthλ
times shorter.At each step, the prover computes
s
polynomialsp_i(x)
andq_i(x)
, (wheres = u.len() / λ
). The polynomialsp_i(x)
are defined as the polynomials passing through particular coordinates of the vectoru
, and the polynomialsq_i(x)
are defined as the polynomials passing through particular coordinates of the vectorv
.Now the prover generates a distributed zero knowledge proof. This proof is just a polynomial
G(x)
which is defined as thesum from i=0 to i=s of p_i(x) * q_i(x)
.Rather than computing the coefficients of this polynomial
G(x)
, the prover can just generate2*λ - 1
points on this curve - as that uniquely defines the polynomial. We will always generate the y values of the points corresponding to the x-coordinates0, 1, 2, ..., 2*λ - 2
.The first
λ
points can be found trivially by just multiplying the known values ofp_i(x)
andq_i(x)
. The nextλ - 1
points require more computation. The prover can just use Lagrange interpolation to generate the nextλ - 1
points on each polynomialp_i(x)
andq_i(x)
, and then multiply these together and sum over i.See a concrete example in this sheet: https://docs.google.com/spreadsheets/d/10tCSgiZyQbt4bMB3KqhAUOCfgfO8xIni83J2saipFCg/edit?usp=sharing
Tab: "All Lagrange Interpolation"